<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="PhotoController.*,java.util.*, java.io.*, java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="STYLESHEET" type="text/css" href="/KOMORIUTA/css/<%=request.getAttribute("photo") %>.css">
<link rel="STYLESHEET" type="text/css" href="/KOMORIUTA/page/page.css">
<script src="/KOMORIUTA/photo/PtOld/PtOld.js" type="text/JavaScript"></script>
<script src="/KOMORIUTA/photo/PtOld/jquery.js" type="text/javascript"></script>
<link rel="STYLESHEET" type="text/css" href="/KOMORIUTA/css/community.css">
<script>
function doList(page){
	document.empFrm.currentPage.value=page;
	document.empFrm.submit();
}
</script>
</head>
<%
ArrayList<PhotoFreeBean> datas2=(ArrayList<PhotoFreeBean>)request.getAttribute("list");
ArrayList<PhotoFreeBean> datas=(ArrayList<PhotoFreeBean>)request.getAttribute("list2");
ArrayList<PhotoFreeBean> datas3=(ArrayList<PhotoFreeBean>)request.getAttribute("list3");

PhotoFreeBean photoFreeBean2=(PhotoFreeBean)request.getAttribute("photoFreeBean");
String nick=(String)session.getAttribute("Mem_Nick");
%>
<body>

<form action="PhotoFreeAction.do" method="post" name="empFrm">
<input type="hidden" name="action" value="pt_free_list" />
<input type="hidden" name="nick" value="<%=nick %>" />
<input type="hidden" name="currentPage" />

<div id="pf1" >
<div id="pts1" >
	<div id="pts1_1" >
		<span style="color:white;font-size:15px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;::: 皆様からお薦めの写真です ::: </span>
	</div>
	<div style="position:relative; width:300px;height:5px;">
	</div>
	<div id="pts1_2" >
		<img src=<%=photoFreeBean2.getPhoto() %> width="70" height="70" border="0">&nbsp;&nbsp;&nbsp;
		<div style="position:relative; left:100px;top:-30px;font-size:15px;font-weight:bold; ">
		<img src="/KOMORIUTA/photo/img/Cm_Free_Read_4.png" style="vertical-align: bottom;"> 1位<a class="black" href="/KOMORIUTA/PhotoFreeAction.do?action=pt_free_read&id=<%=photoFreeBean2.getID() %>&nick=<%=nick %>">
		 <%= photoFreeBean2.getPo_Title() %></a>
		</div>
	
	</div>
	<div id="pts1_3" >
		<table>
			<tr height="30">
				<td>2位</td>
			</tr>
			<tr height="30">
				<td>3位</td>
			</tr>
			<tr height="30">
				<td>4位</td>
			</tr>
			<tr height="30">
				<td>5位</td>
			</tr>
		</table>
	</div>
	<%
	for(PhotoFreeBean photoFreeBean:datas){
	%>
	<div id="pts1_4" >
		<div style="position:relative; height:10px;"></div>
		<a class="black" href="/KOMORIUTA/PhotoFreeAction.do?action=pt_free_read&id=<%=photoFreeBean.getID() %>&nick=<%=nick %>"><%=  photoFreeBean.getPo_Title() %></a>
	</div>
	<%
	}
	%>
</div>
<div id="pts2" >
	<div id="pts2_1">
		<span>:::人気ランキング :::</span>
	</div>
	<div style="height:5px;"></div>
	<div id="pts2_2">
	<table border="0">
		<tr>
			<td width="30">NO |</td>
			<td width="130">タイトル</td>
			<td width="80">| ユーザー名 |</td>
			<td width="50">アクセス</td>
		</tr>
	</table>
	</div>
		<%
		for(PhotoFreeBean photoFreeBean3:datas3){
		
		%>
		<div id="pts2_3">
		<table border=0>
		<tr height="25"> 
			<td width="30"><%= photoFreeBean3.getID() %></td>
			<td width="150"><a  class="black" href="/KOMORIUTA/PhotoFreeAction.do?action=pt_free_read&id=<%=photoFreeBean3.getID() %>&nick=<%=nick %>"><%=photoFreeBean3.getPo_Title() %></a></td>
			<td width="50">
				<a href=javascript:WriteGo("<%=nick%>","<%=photoFreeBean3.getPo_Nick()%>") id="massage<%=photoFreeBean3.getID()%>" class="black"><%=photoFreeBean3.getPo_Nick()%></a>
			</td>
			<td width="50" align="right"><%=photoFreeBean3.getPo_Viewcount() %></td>
		</tr>
		</table>
		</div>
		<%
		}
		%>
	
</div>
</div>
<div id="pf2" style="position:relative;left:20px;width:680px;height:20px; border:0px dashed blue;">
</div>
	<div id="pf3">
			<div id="pf3_1">
			<span>::: 新着フォト :::</span>
			<span><a href="/KOMORIUTA/PhotoFreeAction.do?action=pt_free_list2&nick=<%=nick %>">more</a></span>
			</div>
			<div id="pf3_2" ></div>
			<%
				for(PhotoFreeBean bean : datas2){
					
					String title=bean.getPo_Title();
			%>
			
				<div id="pf3_3" >
					<div id="pf3_3_1">
						<div id="pf3_3_1_1" >
						<a href="/KOMORIUTA/PhotoFreeAction.do?action=pt_free_read&id=<%=bean.getID() %>&nick=<%=nick %>">
						<img src=<%=bean.getPhoto() %> width="110" height="110" border="0">
						</a>
						</div> 
					</div>
					
					<div id="pf3_3_2"  >
					 
					<table border=0 cellpadding="0" cellspacing="0" width="120" style="table-layout:fixed;">
						<tr>
							<td width="55">タイトル：</td><td style="text-overflow:ellipsis; overflow:hidden;"><nobr><%=bean.getPo_Title() %></nobr></td>
						</tr>
						<tr>
							<td>ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;：</td><td style="text-overflow:ellipsis; overflow:hidden;"><nobr>
								<a href=javascript:mass("<%=bean.getID()%>") class="black"><%=bean.getPo_Nick()%></a>
								<a href=javascript:WriteGo("<%=nick%>","<%=bean.getPo_Nick()%>") id="massage<%=bean.getID()%>" class="mass"><img alt=""  src="<%=request.getContextPath()%>/photo/img/message_Send.png" ></a>
							</nobr></td>
						</tr>
						<tr>
							<td>日付&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;：</td><td><%=bean.getPo_Date()  %></td>
						</tr>
						<tr>
							<td>アクセス：</td><td><%=bean.getPo_Viewcount() %></td>
						</tr>
						<tr>
							<td>コメント：</td><td><%=bean.getPo_Comcount() %></td>
						</tr>
					</table>
					</div>
				
					
				</div>
			<%
				}
			%>
	 </div>
</form>
</body>
</html>